﻿Public Class Form1
    Dim strServerName, strDomain, strProject, strUserName, strPassword As String
    Dim arFieldNames(4) As String

    Private Sub RunButton_Click() Handles RunButton.Click
        strServerName = tbServerName.Text
        strDomain = tbDomain.Text
        strProject = tbProject.Text
        strUserName = tbUserName.Text
        strPassword = tbPassword.Text
        queryExcel(strServerName, strDomain, strProject, strUserName, strPassword, arFieldNames)
    End Sub

    Public Sub CloseButton_Click() Handles CloseButton.Click
        If ((appExcel Is Nothing) = (False)) Then
            Try
                appExcel.Quit()
            Catch ex As Exception
                MsgBox("Closed before running query.")
            End Try
        End If
        Close()
    End Sub

    Private Sub TableLayoutPanel1_Paint() Handles TableLayoutPanel1.Paint
        'This is the place to code or call a sub to open a config file for last saved data.

        strServerName = "07ms014.carefusion.com:8080"
        strDomain = "CHALKBOARD"
        strProject = "RoundTripTest"
        strUserName = "DQCUser"
        strPassword = "admin123"
        arFieldNames(0) = "REQ"
        arFieldNames(1) = "RQ_REQ_ID"
        arFieldNames(2) = "RQ_REQ_Name"
        arFieldNames(3) = "RQ_REQ_Comment"
        arFieldNames(4) = "RQ_USER_25"
        tbServerName.Text = strServerName
        tbDomain.Text = strDomain
        tbProject.Text = strProject
        tbUserName.Text = strUserName
        tbPassword.Text = strPassword
        tbQCTable.Text = arFieldNames(0)
        tbField1.Text = arFieldNames(1)
        tbField2.Text = arFieldNames(2)
        tbField3.Text = arFieldNames(3)
        tbField4.Text = arFieldNames(4)
    End Sub

    Private Sub FlowLayoutPanel1_Paint() Handles FlowLayoutPanel1.Paint

    End Sub

    Private Sub FlowLayoutPanel2_Paint() Handles FlowLayoutPanel2.Paint

    End Sub

    Private Sub FlowLayoutPanel3_Paint() Handles FlowLayoutPanel2.Paint

    End Sub

    Private Sub FlowLayoutPanel4_Paint() Handles FlowLayoutPanel4.Paint

    End Sub
    Private Sub ServerName_TextChanged() Handles tbServerName.TextChanged

    End Sub

    Private Sub Domain_TextChanged() Handles tbDomain.TextChanged

    End Sub

    Private Sub Project_TextChanged() Handles tbProject.TextChanged

    End Sub

    Private Sub UserName_TextChanged() Handles tbUserName.TextChanged

    End Sub

    Private Sub Password_TextChanged() Handles tbPassword.TextChanged

    End Sub

    Private Sub Field1_TextChanged() Handles tbField1.TextChanged

    End Sub

    Private Sub Field2_TextChanged() Handles tbField2.TextChanged

    End Sub

    Private Sub Field3_TextChanged() Handles tbField3.TextChanged

    End Sub

    Private Sub Field4_TextChanged() Handles tbField4.TextChanged

    End Sub

    Private Sub QCTable_TextChanged() Handles tbQCTable.TextChanged

    End Sub

    Private Sub LabelFrom_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LabelFrom.Click

    End Sub

    Private Sub Label_SELECT_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label_SELECT.Click

    End Sub
End Class